<?php

namespace Muyuxuanpay\pay;

use Muyuxuanpay\pay\logic\ChangJie;
use Muyuxuanpay\pay\logic\FenFu;
use Muyuxuanpay\pay\logic\OfficialWechat;

class MuPay
{
    protected $baseModel = null;
    protected $config = [];
    public function __construct(?array $config = null)
    {
        if(!empty($config)){
            $this->config = $config;
        }
    }

    /**
     * 获取官方
     * @param array|null $config
     * @return OfficialWechat
     */
    public static function OfficialAlipay(?array $config){
        return new OfficialWechat($config,'official_alipay');
    }

    /**
     * 丰付支付
     * @param array|null $config
     * @return FenFu
     */
    public static function FenFu(?array $config){
        return new FenFu($config,'fen_fu');
    }
    public static function ChangJie(?array $config){
        return new ChangJie($config,'chang_jie');
    }
}